import { CATEGORIES_SET_DATA } from "../action/actionType";
import { DISCOVER_SET_DATA } from './../action/actionType';

export let discover = (state = {
    categoriesData: null,
    discoverData: null,
}, action) => {
    let { type } = action;
    let newState = { ...state };
    switch (type) {
        case CATEGORIES_SET_DATA:
            newState.categoriesData = action.obj;
            return newState
            break;
        case DISCOVER_SET_DATA:
            newState.discoverData = action.obj;
            return newState
            break;
        default:
            return newState
            break;
    }
}